//作业标题(2726)
//消失的数字
//
//作业内容
//消失的数字
//https://leetcode.cn/problems/missing-number-lcci/submissions/
class Solution1 {
    public int missingNumber(int[] nums) {
        int[] array = new int[nums.length + 1];
        for(int e : nums)
        {
            array[e]++;
        }

        for(int i = 0; i < array.length; i++)
        {
            if(array[i] == 0)
            {
                return i;
            }
        }
        return 0;
    }
}

//作业标题(2727)
//旋转数组
//
//作业内容
//旋转数组
//https://leetcode.cn/problems/rotate-array/description/
class Solution2 {

    public void rotate(int[] nums, int k) {
        int n = nums.length;
        int[] array = new int[n];
        for(int i = 0; i < n; i++)
        {
            array[(i+k)%n] = nums[i];
        }
        System.arraycopy(array,0,nums,0,n);
    }
}
public class homework {
}
